package models

import (
	"time"
)

type Category struct {
	ID        uint      `gorm:"primaryKey" json:"id"`
	Name      string    `gorm:"index;not null" json:"name"`
	UserID    uint      `gorm:"not null" json:"user_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`

	User   User    `gorm:"foreignKey:UserID" json:"user"`
	Images []Image `gorm:"foreignKey:CategoryID" json:"images"`
}
